package com.haoliang.spring.property.value.config;

import com.haoliang.spring.property.value.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Author zhaohaoliang
 * @Date 创建于 下午8:18 2019/3/10
 * @Description 请输入类的描述信息
 */
//加载外部配置文件
@PropertySource(value = {"classpath:/person.properties"})
@Configuration
public class PropertyConfig {

    @Bean(value = "person")
    public Person getPerson() {
        return new Person();
    }
}
